#include "GameMenu.h"


GameMenu::GameMenu(GameManagement* owner)
{
	_owner = owner;
	_sprPushKey = new Sprite(owner->getSpriteHandler(), _MENU_PUSHKEY, true);
	_sprBackground = new Sprite(owner->getSpriteHandler(), _ID_MENU, true);
	_sprPushKey->setDelay(10);
	_x = 800;
}


GameMenu::~GameMenu()
{
}

bool GameMenu::checkSetInput() {
	if (_x > 0) {
		_x = 0;
		return false;
	} else {
		return true;
	}
}

void GameMenu::update()
{
	if (_x > 0) _x -= 2;
	_sprPushKey->Next();
}

void GameMenu::draw()
{
	_sprBackground->Render(_owner->getBackground(), _x + 400, 300);
	_sprPushKey->Render(_owner->getBackground(), _x  + 230, 200);
}


